/**
 * base-drawer.less - DevDrawer 组件样式
 * =============================================================
 * Created By: Yaohaixiao
 * Update: 2022.11.08
 */
.base-drawer {
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  visibility: hidden;
  overflow: hidden;

  &__modal {
    .shadow_light_regular();
    position: absolute;
    z-index: 21;
    background-color: @white;

    transition-duration: 0.4s;
    overflow: hidden;

    .base-footer {
      padding-top: 16px;
      padding-bottom: 16px;

      .base-button {
        min-width: 80px;
      }
    }
  }

  &__title {
    .font_size_medium();
    .font_weight_regular();

    + .base-tabs-nav {
      margin-left: 16px;

      &:before {
        content: '';
        position: absolute;
        z-index: 2;
        top: 50%;
        left: 0;
        height: 16px;
        width: 0;
        margin-top: -8px;
        border-left: 1px solid @secondary_border_color;
        overflow: hidden;
      }
    }
  }

  &__icon {
    position: relative;
    z-index: 1;
    display: inline-block;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    overflow: hidden;

    .ijg-icon {
      position: absolute;
      z-index: 2;
      top: -1px;
      left: 0;
      cursor: pointer;
      color: @default_icon_color;

      &:hover {
        color: @danger_color;
      }
    }
  }

  &__help {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 50px;
    height: 30px;
    line-height: 30px;
    color: @primary_color;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;

    .ijs-icon {
      color: @primary_color;

      &:hover {
        color: @primary_color;
      }
    }
  }

  &__close {
    position: absolute;
    z-index: 2;
    top: 12px;
    right: 10px;
    width: 30px;
    height: 30px;
    line-height: 36px;
    color: @gray;
    text-align: center;
    cursor: pointer;
    overflow: hidden;

    .ijs-icon {
      position: absolute;
      z-index: 3;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }

    &:hover {
      color: @third_text_color;
    }
  }

  &__main {
    padding: 30px 20px;
  }

  &_rtl,
  &_ltr {
    &.base-drawer_shorter {
      top: 52px;
      height: calc(100% - 52px);
    }

    &.base-drawer_mini {
      width: 480px;
    }

    &.base-drawer_small {
      width: 540px;
    }

    &.base-drawer_regular {
      width: 680px;
    }

    &.base-drawer_medium {
      width: 720px;
    }

    &.base-drawer_large {
      width: 960px;
    }
  }

  &__overlay {
    content: '';
    position: relative;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: @white;
    opacity: 0.1;
    overflow: hidden;
  }

  &_rtl {
    border-left: 1px solid @primary_border_color;

    &.base-drawer_mini {
      &.base-drawer_closed {
        right: -490px;
      }
    }

    &.base-drawer_small {
      &.base-drawer_closed {
        right: -550px;
      }
    }

    &.base-drawer_regular {
      &.base-drawer_closed {
        right: -690px;
      }
    }

    &.base-drawer_medium {
      &.base-drawer_closed {
        right: -730px;
      }
    }

    &.base-drawer_large {
      &.base-drawer_closed {
        right: -970px;
      }
    }
  }

  &_ltr {
    border-right: 1px solid @primary_border_color;

    &.base-drawer_mini {
      &.base-drawer_closed {
        left: -490px;
      }
    }

    &.base-drawer_small {
      &.dev-drawer_closed {
        left: -550px;
      }
    }

    &.base-drawer_regular {
      &.base-drawer_closed {
        left: -690px;
      }
    }

    &.base-drawer_medium {
      &.base-drawer_closed {
        left: -730px;
      }
    }

    &.base-drawer_large {
      &.base-drawer_closed {
        left: -970px;
      }
    }
  }

  &_ttb,
  &_btt {
    left: 0;
    width: 100%;

    &.base-drawer_mini {
      height: 320px;
    }

    &.base-drawer_small {
      height: 360px;
    }

    &.base-drawer_regular {
      height: 400px;
    }

    &.base-drawer_medium {
      height: 440px;
    }

    &.base-drawer_large {
      height: 480px;
    }
  }

  &_ttb {
    border-bottom: 1px solid @primary_border_color;

    &.base-drawer_mini {
      &.base-drawer_closed {
        top: -330px;
      }
    }

    &.base-drawer_small {
      &.base-drawer_closed {
        top: -370px;
      }
    }

    &.base-drawer_regular {
      &.base-drawer_closed {
        top: -410px;
      }
    }

    &.base-drawer_medium {
      &.base-drawer_closed {
        top: -450px;
      }
    }

    &.base-drawer_large {
      &.base-drawer_closed {
        top: -490px;
      }
    }
  }

  &_btt {
    top: initial;
    border-top: 1px solid @primary_border_color;

    &.base-drawer_mini {
      &.base-drawer_closed {
        bottom: -330px;
      }
    }

    &.base-drawer_small {
      &.base-drawer_closed {
        bottom: -370px;
      }
    }

    &.base-drawer_regular {
      &.base-drawer_closed {
        bottom: -410px;
      }
    }

    &.base-drawer_medium {
      &.base-drawer_closed {
        bottom: -450px;
      }
    }

    &.base-drawer_large {
      &.base-drawer_closed {
        bottom: -490px;
      }
    }
  }

  &_opened {
    visibility: visible;
    z-index: 6;

    &.base-drawer_rtl {
      right: 0;
    }

    &.base-drawer_ltr {
      left: 0;
    }

    &.base-drawer_ttb {
      top: 0;
    }

    &.base-drawer_btt {
      bottom: 0;
    }
  }
}
